import { Directive, EventEmitter, Input, OnInit, Output } from '@angular/core';

@Directive({
  selector: '[appHelloWorld]',
})
export class HelloWorldDirective implements OnInit {
  constructor() {}

  @Input('appHelloWorld') mes = '';

  @Output() appHelloWorldChange = new EventEmitter<string>();

  ngOnInit() {
    setTimeout(() => {
      this.appHelloWorldChange.emit('world');
    }, 2000);
  }
}
